VxCheckBox


Create a CheckBox allowing titles and labels

Syntax

VxCheckBox object_name [-title title ] [-label label ] VtCheckBoxArgs

Description

Creates a VtCheckBox, allowing -title and -label.

Parameters

object_name
The widget hierarchy of the CheckBox.

-title
Creates a Form around the CheckBox widget and attaches a Label above it. The Label is attached to the top side of the Form. The CheckBox widget is attached to the left, right and bottom sides of the Form and also to the bottom side of the Label.

-label
Creates a Form around the CheckBox widget and attaches a Label to the left side of it. The Label is attached to the top and bottom of the Form. The CheckBox widget is attached to the right, top and bottom sides of the Form.

VtCheckBoxArgs
Any argument(s) legal for VtCheckBox.

Example

The following code produces a VxCheckBox with a title. The CheckBox arranges its contents horizontally in two columns. Four ToggleButtons are created to illustrate the CheckBox's behavior.

set app [VtOpen "Demo"]

set form [VtFormDialog $app.form -title "VxCheckBox Demo"]

set checkbox [VxCheckBox $form.checkbox \
        -horizontal \
        -numColumns 2 \
        -title "Which fruit do you like?"]

set toggle1 [VtToggleButton $checkbox.toggle1 -label Oranges]
set toggle2 [VtToggleButton $checkbox.toggle2 -label Apples]
set toggle3 [VtToggleButton $checkbox.toggle3 -label Bananas]
set toggle4 [VtToggleButton $checkbox.toggle4 -label Kumquats]

VtShow $form
VtMainLoop

This code produces the following:

Notes

To get the widgetName of the Label or Form that is created using this command use VxGetVar. For example:

VxGetVar $widgetName "form"
or
VxGetVar $widgetName "label"